package com.atguigu;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

public class ExcelListener extends AnalysisEventListener<UserData> {
    //一行一行的读取，从第二行开始读
    @Override
    public void invoke(UserData o, AnalysisContext analysisContext) {
        System.out.println(o);
    }

    //读取首行信息
    @Override
    public void invokeHeadMap(Map headMap, AnalysisContext context) {
        System.out.println("读取表头信息： "+headMap);
    }

    //读取之后执行
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
